home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 786 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.1 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: knightofni@usa.pipeline.com (The Knight Who Says Ni!)
  3. Newsgroups: comp.lang.c++
  4. Subject: BC4.5 fstream
  5. Date: Sun, 07 Jan 1996 03:05:56 GMT
  6. Organization: PSINet/Pipeline USA
  7. Message-ID: <4cncvn$q51@news1.usa.pipeline.com>
  8. NNTP-Posting-Host: pipe4.h1.usa.pipeline.com
  9. X-Newsreader: Forte Free Agent 1.0.82
  10.  
  11. I'm using BC4.5 to write a door game, and I want it to be compatible
  12. with multible nodes.  This means locking the data files whenever it
  13. accesses them.  If I use fstream::open(), does that prevent all other
  14. programs from accessing the file?  If I open it while another node has
  15. the file open, what will happen? fstream::open() doesn't return
  16. anything, so how will I know?
  17.  
  18. Also, how do I delete the contents of a file, similar to opening it
  19. with ios::trunc mode, without closing & reopening it?
  20.  _______________________________
  21. / \  The Knight Who Says "Ni!"  \
  22. \_|                             |
  23.   |   I'm not nearly as think   |
  24.   |    as you confused I am.    |
  25.   |  ___________________________|_
  26.   \_/____________________________/
  27.  
  28.